package com.pj.wisdomlogistics.mvp.presenter;


import com.pj.wisdomlogistics.entity.MeetingSimpleInfo;
import com.pj.wisdomlogistics.mvp.contract.MeetingChooseContract;
import com.pj.wisdomlogistics.mvp.frame.ActivityPresenter;
import com.pj.wisdomlogistics.mvp.model.MeetingChooseModel;
import com.pj.wisdomlogistics.rx.FilterSubscriber;

import java.util.List;


public class MeetingChoosePresenter extends ActivityPresenter<MeetingChooseModel,MeetingChooseContract.View> implements MeetingChooseContract.Presenter{
    public static final String TAG = "MeetingChoosePresenter";


    @Override
    public void findMeetingRoomList() {
        addSubscription(getModel().findMeetingRoomList(), new FilterSubscriber<List<MeetingSimpleInfo>>() {
            @Override
            public void onNext(List<MeetingSimpleInfo> mList) {
                getView().showSuccess(mList);
            }

            @Override
            public void onError(int errorCode, String errorMsg) {
                getView().showError(errorMsg);
            }

        });
    }
}
